import request from '@/config/axios'

// 客户跟进记录 VO
export interface CustomerFollowUpVO {
  id: number // 序号
  customerId: number // 关联客户
  contactId: number // 联系人
  contactName: string // 关联联系人ID
  followMethod: number // 跟进方式
  followTime: Date // 跟进时间
  content: string // 沟通内容
  nextContactTime: Date // 下次沟通时间
  files: string // 附件路径
  creatorName: string // 创建者
  updaterName: string // 更新者
}



// 客户跟进记录 API
export const CustomerFollowUpApi = {
  // 查询客户跟进记录分页
  getCustomerFollowUpPage: async (params: any) => {
    return await request.get({ url: `/oa/customer-follow-up/page`, params })
  },

  // 查询客户跟进记录详情
  getCustomerFollowUp: async (id: number) => {
    return await request.get({ url: `/oa/customer-follow-up/get?id=` + id })
  },

  // 新增客户跟进记录
  createCustomerFollowUp: async (data: CustomerFollowUpVO) => {
    return await request.post({ url: `/oa/customer-follow-up/create`, data })
  },

  // 修改客户跟进记录
  updateCustomerFollowUp: async (data: CustomerFollowUpVO) => {
    return await request.put({ url: `/oa/customer-follow-up/update`, data })
  },

  // 删除客户跟进记录
  deleteCustomerFollowUp: async (id: number) => {
    return await request.delete({ url: `/oa/customer-follow-up/delete?id=` + id })
  },

  // 导出客户跟进记录 Excel
  exportCustomerFollowUp: async (params) => {
    return await request.download({ url: `/oa/customer-follow-up/export-excel`, params })
  },

  
}
